package xginxauth

import (
	"gitee.com/xiaoyutab/xgotool/optional/xauth"
	"gitee.com/xiaoyutab/xgotool/xgin"
	"github.com/gin-gonic/gin"
)

// 获取角色列表信息
//
//	GET	role.list
func roleList(c *gin.Context) *xgin.Response {
	count, list, err := xauth.ListRole(c.GetInt("offset"), c.GetInt("limit"))
	if err != nil {
		return xgin.Resp().Error(err)
	}
	return xgin.Resp().Page(c, list, count)
}
